In recent years the functions of OSes (Operating Systems) have been enhanced and expanded. As a result, the scale of OSes has increased and failures which occur in OSes have become more complex. A trace technique is known as one of techniques for examining an OS failure. With the trace technique information regarding the state of a computer at a point of time at which a specific code in a program is executed is collected. With the trace technique information, such as the contents of a register, at the time when a specific code is executed is collected. The trace technique is used especially for examining a complex failure the cause of which is difficult to clear up. In order to examine failures in OSes which will develop further in the future and which will become more complex, it is important to improve the trace technique.
For example, a debugging method which makes it possible to perform, even in the case of an exception occurring at the same point in a program, different exception handling in each process is proposed as a technique which is useful for examining a failure.
Japanese Laid-open Patent Publication No. 2006-268298
If a trace process is performed by calling a program, such as an API (Application Program Interface), prepared by an OS, then the flexibility of the trace process increases. For example, if an API for manipulating a file in a storage unit can be called during a trace process, then information collected in the trace process can be saved in the storage unit. A failure may occur in a program, such as an API, prepared by an OS. In that case, a trace process will be performed with the program, such as an API, as a trace object.
However, the conventional trace techniques have the following problem. If a program, such as an API, called during a trace process is treated as a trace object, then the program is recursively called in the trace process and the trace process enters an endless loop. As a result, it is impossible to treat a program called during a trace process as a trace object.